import { useHistory } from "react-router";

import routerList from "../../utils/routeList";
import "./index.scss";

export default function HomePage() {
  const history = useHistory();

  return (
    <div className={"homePage"}>
      {routerList.map((list, index) => {
        const { name, path } = list;
        return index !== 0 ? (
          <div
            className="button"
            onClick={() => {
              history.push(path);
            }}
          >
            {name}
          </div>
        ) : (
          <></>
        );
      })}
    </div>
  );
}
